package com.bosssoft.setp.model.system;

import com.bosssoft.setp.handler.AnnounceDataProxy;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.EditType;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.upms.model.base.HyperModel;

import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import java.util.Date;

@Erupt(name = "公告",dataProxy = AnnounceDataProxy.class)
@Table(name = "setp_gong")
@Entity
public class Announcemen extends HyperModel {
    @Lob  //定义数据库类为大文本类型，支持存入更多的数据
    @EruptField(
            views = @View(title = "公告内容"),
            edit = @Edit(title = "公告内容", type = EditType.TEXTAREA, notNull = true,search = @Search(vague = true))
    )
    private String title;
    @EruptField(
            views = @View(title = "开始时间"),
            edit = @Edit(title = "开始时间", notNull = true)
    )
    private Date date;
    @EruptField(
            views = @View(title = "持续天数", sortable = true),
            edit = @Edit(title = "持续天数", notNull = true)
    )
    private Integer number;

    public Integer getNumber() {
        return number;
    }
}
